import datetime
from django.db import migrations, models
import django.db.models.deletion
import tinymce.models


class Migration(migrations.Migration):

    dependencies = [
        ('df_goods', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='ContentChart',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('isDelete', models.BooleanField(default=False)),
                ('ctitle', models.CharField(max_length=20, verbose_name='商品名称')),
                ('cusername', models.CharField(max_length=20, verbose_name='评论者昵称')),
                ('cusername1', models.CharField(max_length=20, verbose_name='回复者昵称')),
                ('ccontent_chart', tinymce.models.HTMLField(max_length=200, verbose_name='评论回复')),
                ('date_publish', models.DateTimeField(default=datetime.datetime.now, verbose_name='发表时间')),
            ],
            options={
                'verbose_name': '评论回复',
                'verbose_name_plural': '评论回复',
            },
        ),
        migrations.CreateModel(
            name='GoodsContent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('isDelete', models.BooleanField(default=False)),
                ('ctitle', models.CharField(max_length=20, verbose_name='商品名称')),
                ('cpic', models.ImageField(blank=True, null=True, upload_to='df_goods/image/%Y/%m', verbose_name='上传图片')),
                ('cusername', models.CharField(max_length=20, verbose_name='买家昵称')),
                ('clogo', models.CharField(default=None, max_length=200, verbose_name='买家头像')),
                ('cuser_content', tinymce.models.HTMLField(max_length=200, verbose_name='用户评论')),
                ('date_publish', models.DateTimeField(default=datetime.datetime.now, verbose_name='发表时间')),
            ],
            options={
                'verbose_name': '商品评论',
                'verbose_name_plural': '商品评论',
            },
        ),
        migrations.AlterModelOptions(
            name='goodsinfo',
            options={'verbose_name': '商品', 'verbose_name_plural': '商品'},
        ),
        migrations.AlterModelOptions(
            name='typeinfo',
            options={'verbose_name': '商品类型', 'verbose_name_plural': '商品类型'},
        ),
        migrations.AlterField(
            model_name='goodsinfo',
            name='gclick',
            field=models.IntegerField(default=0, verbose_name='点击量'),
        ),
        migrations.AlterField(
            model_name='goodsinfo',
            name='gcontent',
            field=tinymce.models.HTMLField(max_length=200, verbose_name='详情'),
        ),
        migrations.AlterField(
            model_name='goodsinfo',
            name='gjianjie',
            field=models.CharField(max_length=200, verbose_name='简介'),
        ),
        migrations.AlterField(
            model_name='goodsinfo',
            name='gkucun',
            field=models.IntegerField(default=0, verbose_name='库存'),
        ),
        migrations.AlterField(
            model_name='goodsinfo',
            name='gpic',
            field=models.ImageField(blank=True, null=True, upload_to='df_goods/image/%Y/%m', verbose_name='商品图片'),
        ),
        migrations.AlterField(
            model_name='goodsinfo',
            name='gprice',
            field=models.DecimalField(decimal_places=2, max_digits=7, verbose_name='商品价格'),
        ),
        migrations.AlterField(
            model_name='goodsinfo',
            name='gtitle',
            field=models.CharField(max_length=20, unique=True, verbose_name='商品名称'),
        ),
        migrations.AlterField(
            model_name='goodsinfo',
            name='gtype',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='df_goods.TypeInfo', verbose_name='分类'),
        ),
        migrations.AlterField(
            model_name='goodsinfo',
            name='gunit',
            field=models.CharField(max_length=20, verbose_name='卖家昵称'),
        ),
        migrations.AlterField(
            model_name='typeinfo',
            name='ttitle',
            field=models.CharField(max_length=20, verbose_name='分类'),
        ),
        migrations.AddField(
            model_name='goodscontent',
            name='cgoodsname',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='df_goods.GoodsInfo', verbose_name='外键商品'),
        ),
        migrations.AddField(
            model_name='contentchart',
            name='ccontent',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='df_goods.GoodsContent', verbose_name='评论id'),
        ),
    ]
